cd ..
cd .\public\proto\

set dirproto=./
set dirgo=./go/
set dircs=./cs/
set dircsu=./csu/


for %%i in (*.proto) do (
    clang-format -style="{BasedOnStyle: Google, IndentWidth: 4, ColumnLimit: 0, AlignConsecutiveAssignments: true, AlignConsecutiveAssignments: true}" -i %%i
    protoc.exe --go_out=%dirgo% %%i
    protoc.exe --csharp_out=%dircs% %%i
    protoc3.2.exe --csharp_out=%dircsu% %%i
)

cd ..\..\

set scsvcs=.\public\proto\cs
set dessvcs=.\svcs\SvCore\Proto
del /q/a/f %dessvcs%\*.cs
xcopy %scsvcs%\*.cs %dessvcs%\ /y

set scclientcs1=.\public\proto\cs
set desclientcs1=.\clientwpf\client\zpb
del /q/a/f %desclientcs1%\*.cs
xcopy %scclientcs1%\*.cs %desclientcs1%\ /y

set scclientcs2=.\public\proto\csu
set desclientcs2=.\client\Assets\Network\pb
del /q/a/f %desclientcs2%\*.cs
xcopy %scclientcs2%\*.cs %desclientcs2%\ /y

pause